Updates an existing line in a cart.Updates an existing line in the shopper's cart. Introduced in v2.21
Method | UpdateCartLine |
The request body is of type UpdateCartLine.
Name | Description | Data Type |
---|---|---|
ID | The identifier of the cart detail line to update | xml:int |
StockCode | The stock code for the cart detail line to update | xml:string |
Qty | The quantity for the cart detail line to update. | xml:int |
UOM | The type of the unit of measure. Valid options are as follows:
| xml:anyType |
Options | An object with optional parameters. Available parameters
| xml:string |
// Example: // Update the line with ID 1003 // changing the quantity to 2 // including the warehouse of S as an option MakeAJAXCall("Cart.UpdateCartLine", { ID: 1003, StockCode: 'B1208', Qty: 2, UOM: 0, Options: { Warehouse: 'S' } }, console.log)
The response body is of type UpdateCartLineResponse.
Name | Description | Data Type |
---|---|---|
UpdateCartLineResult | A string value containing a JSON object containing the results of the cart, after the update and including a snapshot of the line as it was prior to the update.
{ "Data": { "ItemCount": 2, "SubTotalAmount": 262.0, "Weight": 2.0, "Volume": 0.0, "LastUpdated": "2022-03-29T16:06:49.86", "SubTotal": "$262.00 ", "Detail": [{ "Row": 1, "ID": 1003, "Item_ID": 632, "Parent_ID": -1, "StockCode": "B1208", "Description": "Seat Stay Tube", "Quantity": 2, "UOM": "EA", "UnitType": 1, "DefaultPriceAmount": 131.0, "CustomerPriceAmount": 131.0, "DiscountPriceAmount": 131.0, "WebPriceAmount": 131.0, "TotalPriceAmount": 262.0, "UnitWeight": 1.0, "UnitVolume": 0.0, "IsBackordered": false, "Warehouse": "S", "LastUpdated": "2022-03-29T16:31:19.293", "URL": "/ECommerce/product/b1208/seat-stay-tube", "Photo": "/Ecommerce/site/images/Photo1/B1208.jpg", "DefaultPrice": "$131.00 ", "CustomerPrice": "$131.00 ", "DiscountPrice": "$131.00 ", "WebPrice": "$131.00 ", "TotalPrice": "$262.00 " }], "OriginalDetail": { "OrderHeader_ID": 24784, "Item_ID": 632, "StockCode": "B1208", "ProductName": "Seat Stay Tube", "CartDate": "2022-03-29T16:31:10.813", "Quantity": 1, "UnitType": 1, "UnitLabel": "EA", "UnitMass": 1.0, "UnitVolume": 0.0, "UnitPrice": 131.0, "Price": 131.0, "DefaultPrice": 131.0, "CustomerPrice": 131.0, "DiscountPrice": 131.0, "ItemWarehouse": "S", "CustomData": "{}", "ModifyDate": "2022-03-29T16:29:35.047" } }, "Result": { "Success": true, "Message": "The cart line has been updated successfully. There are 2 items in the Shopping Cart.", "ElapsedTime": "38 ms" } } | xml:string |